package com.example.trafficexam2.dialog;

import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

import com.example.trafficexam2.R;

/**
 * Created by Administrator on 2018/1/12.
 */

public class NetSettingDialog extends Dialog {

    TextView mTvP1,mTvP2,mTvP3,mTvP4;
    Button mBtnSet;
    Context mContext;
    public NetSettingDialog(Context context) {
        super(context);

        setContentView(R.layout.net_setting_dialog_layout);
        mContext = context;
        mTvP1 = (TextView) findViewById(R.id.id_tv_ip1);
        mTvP2 = (TextView) findViewById(R.id.id_tv_ip2);
        mTvP3 = (TextView) findViewById(R.id.id_tv_ip3);
        mTvP4 = (TextView) findViewById(R.id.id_tv_ip4);
        mBtnSet = (Button) findViewById(R.id.id_btn_set);

        mBtnSet.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(mContext, "设置完成", Toast.LENGTH_SHORT).show();
                NetSettingDialog.this.dismiss();
            }
        });
    }
}
